package org.sy.lab.多线程基础._1_管理._2_状态切换;


/**
 * 实现Runnable来创建线程
 * 优点是可以继承其他的类，可以作为多个Thread的target实现资源共享
 */
public class UnLockThread implements Runnable {
	
private Object lock;
	
	public UnLockThread(Object lock) {
		this.lock = lock;
	}
	
	@Override
	public void run() {
		System.out.println("线程运行：UnlockThread唤醒lock");
		synchronized (lock) {
			lock.notify();
		}
	}
}
